﻿<UserControl x:Class="UIComposition.EmployeeModule.Views.EmployeeSummaryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
             xmlns:prism="http://www.codeplex.com/prism">

	<Grid x:Name="LayoutRoot">
		<Grid.Background>
			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
				<GradientStop Color="#FF7B97D4" />
				<GradientStop Color="#FF244C8D" Offset="1" />
			</LinearGradientBrush>
		</Grid.Background>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>

		<TextBlock Grid.Row="0" Text="Employee Summary View" TextWrapping="Wrap" FontSize="18" Foreground="#FF2F3806" Margin="8" />

        <!--The Tab control defines a region, TabRegion, into which the EmployeeDetailsView and EmployeeProjectsView will be displayed.-->
        <!--The TabRegion defines a RegionContext which provides a reference to the currently selected employee.-->
        <sdk:TabControl Grid.Row="1" AutomationProperties.AutomationId="EmployeeSummaryTabControl" Margin="8"
                        prism:RegionManager.RegionName="TabRegion"
                        prism:RegionManager.RegionContext="{Binding CurrentEmployee}"
                        Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
			<prism:TabControlRegionAdapter.ItemContainerStyle>
				<Style TargetType="sdk:TabItem">
					<Setter Property="HeaderTemplate">
						<Setter.Value>
                            <!--Display the child view name on the tab header-->
							<DataTemplate>
								<TextBlock Text="{Binding ViewName}" />
							</DataTemplate>
						</Setter.Value>
					</Setter>
				</Style>
			</prism:TabControlRegionAdapter.ItemContainerStyle>
		</sdk:TabControl>

	</Grid>

</UserControl>